package fangzhiyi_day0325.ArrayList;

import java.util.Scanner;

/**
 * @author fangzhiyi
 * @version 1.0
 * @date 2025/3/25 11:07
 * @description
 */
public class Test {
        public static void main(String[] args) {
                Dao dao = new Dao();
                while (true) {
                        System.out.println("-------------------------------------------------");
                        System.out.println("1.查询所有学生信息");
                        System.out.println("2.添加学生信息");
                        System.out.println("3.修改学生成绩");
                        System.out.println("4.删除学生信息");
                        System.out.println("5.对学生信息按年龄从小到大排序");
                        System.out.println("6.对学生成绩按从高到第排序");
                        System.out.println("7.退出系统");
                        System.out.println("-------------------------------------------------");
                        System.out.println("请输入你的选择");
                        int num = new Scanner(System.in).nextInt();
                        switch (num) {
                                case 1:
                                        dao.findStu();
                                        break;
                                case 2:
                                        dao.addStu();
                                        break;
                                case 3:
                                        dao.setStu();
                                        break;
                                case 4:
                                        dao.delStu();
                                        break;
                                case 5:
                                        dao.ageSort();
                                        break;
                                case 6:
                                        dao.scoreSort();
                                        break;
                                default:
                                        System.exit(0);


                        }
                }
        }
}
